#ifndef _MEMORY_H
#define _MEMORY_H

// C++ Standard Library
#include <iostream>
#include <string>
#include <map>

// Windows API
#include <Windows.h>
#include <Psapi.h>

#pragma comment(lib, "Psapi.lib")

namespace mem
{
	class CMemory
	{
	public:
		CMemory();
		~CMemory();

		bool AddSignature(const char *name, const char *module, const unsigned char *signature, const char *mask, long offset = 0);
		byte* GetAddress(const char *name);

		std::map<std::string, byte*> AddressMap;
	};

	namespace util
	{
		inline bool DataCompare(const unsigned char *data, const unsigned char *signature, const char *mask);
		inline byte* FindPattern(unsigned char *address, unsigned int size, const unsigned char *signature, const char *mask);
	}
}

#endif